/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/{{apis}}/dto/{{apiDtos@DEFAULT}}.java.hbs
 */
package cn.ibizlab.api.dto;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 部门[SysDepartmentDTO]
 *
 * @author generator
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("部门DTO")
public class SysDepartmentDTO extends DTOBase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @JsonProperty("id")
    @JSONField(name = "id")
    @ApiModelProperty(value = "标识", position = 0)
    private String id;

    /**
     * 部门名称
     */
    @JsonProperty("department_name")
    @JSONField(name = "department_name")
    @ApiModelProperty(value = "部门名称", position = 1)
    private String departmentName;

    /**
     * 创建人
     */
    @JsonProperty("creator")
    @JSONField(name = "creator")
    @ApiModelProperty(value = "创建人", position = 2)
    private String creator;

    /**
     * 创建时间
     */
    @JsonProperty("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "create_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", position = 3)
    private Date createTime;

    /**
     * 最后更新人
     */
    @JsonProperty("updater")
    @JSONField(name = "updater")
    @ApiModelProperty(value = "最后更新人", position = 4)
    private String updater;

    /**
     * 最后更新时间
     */
    @JsonProperty("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "update_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后更新时间", position = 5)
    private Date updateTime;

    /**
     * DC
     */
    @JsonProperty("dc")
    @JSONField(name = "dc")
    @ApiModelProperty(value = "DC", position = 6)
    private String dc;

    /**
     * 组织机构标识
     */
    @JsonProperty("organization_id")
    @JSONField(name = "organization_id")
    @ApiModelProperty(value = "组织机构标识", position = 7)
    private String organizationId;

    /**
     * 组织机构名称
     */
    @JsonProperty("organization_name")
    @JSONField(name = "organization_name")
    @ApiModelProperty(value = "组织机构名称", position = 8)
    private String organizationName;

    /**
     * 机构编号
     */
    @JsonProperty("organization_number")
    @JSONField(name = "organization_number")
    @ApiModelProperty(value = "机构编号", position = 9)
    private String organizationNumber;

    /**
     * 上级部门标识
     */
    @JsonProperty("parent_id")
    @JSONField(name = "parent_id")
    @ApiModelProperty(value = "上级部门标识", position = 10)
    private String parentId;

    /**
     * 上级部门名称
     */
    @JsonProperty("parent_name")
    @JSONField(name = "parent_name")
    @ApiModelProperty(value = "上级部门名称", position = 11)
    private String parentName;

    /**
     * 部门编号
     */
    @JsonProperty("department_number")
    @JSONField(name = "department_number")
    @ApiModelProperty(value = "部门编号", position = 12)
    private String departmentNumber;

    /**
     * 备注
     */
    @JsonProperty("description")
    @JSONField(name = "description")
    @ApiModelProperty(value = "备注", position = 13)
    private String description;

    /**
     * 简称
     */
    @JsonProperty("short_name")
    @JSONField(name = "short_name")
    @ApiModelProperty(value = "简称", position = 14)
    private String shortName;

    /**
     * 排序
     */
    @JsonProperty("sort")
    @JSONField(name = "sort")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "排序", position = 15)
    private Long sort;

    /**
     * 业务类别
     */
    @JsonProperty("business_category")
    @JSONField(name = "business_category")
    @ApiModelProperty(value = "业务类别", position = 16)
    private List<String> businessCategory;

    /**
     * 上级标识
     */
    @JsonProperty("parent_unit_id")
    @JSONField(name = "parent_unit_id")
    @ApiModelProperty(value = "上级标识", position = 17)
    private String parentUnitId;

    /**
     * 上级名称
     */
    @JsonProperty("parent_unit_name")
    @JSONField(name = "parent_unit_name")
    @ApiModelProperty(value = "上级名称", position = 18)
    private String parentUnitName;

    /**
     * DN
     */
    @JsonProperty("dn")
    @JSONField(name = "dn")
    @ApiModelProperty(value = "DN", position = 19)
    private String dn;

    /**
     * 下级部门
     */
    @JsonProperty("children")
    @JSONField(name = "children")
    @ApiModelProperty(value = "下级部门", position = 20)
    private List<SysDepartmentDTO> children;

    /**
     * 上级标识
     */
    @JsonProperty("parent_ids")
    @JSONField(name = "parent_ids")
    @ApiModelProperty(value = "上级标识", position = 21)
    private List<String> parentIds;

    /**
     * 下级标识
     */
    @JsonProperty("sub_ids")
    @JSONField(name = "sub_ids")
    @ApiModelProperty(value = "下级标识", position = 22)
    private List<String> subIds;

    /**
     * 用户组
     */
    @JsonProperty("groups")
    @JSONField(name = "groups")
    @ApiModelProperty(value = "用户组", position = 23)
    private List<SysOrganizationalRoleDTO> groups;


    /**
     * 设置 [部门名称]
     */
    public SysDepartmentDTO setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
        this.modify("department_name", departmentName);
        return this;
    }

    /**
     * 设置 [DC]
     */
    public SysDepartmentDTO setDc(String dc) {
        this.dc = dc;
        this.modify("dc", dc);
        return this;
    }

    /**
     * 设置 [组织机构标识]
     */
    public SysDepartmentDTO setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
        this.modify("organization_id", organizationId);
        return this;
    }

    /**
     * 设置 [组织机构名称]
     */
    public SysDepartmentDTO setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
        this.modify("organization_name", organizationName);
        return this;
    }

    /**
     * 设置 [机构编号]
     */
    public SysDepartmentDTO setOrganizationNumber(String organizationNumber) {
        this.organizationNumber = organizationNumber;
        this.modify("organization_number", organizationNumber);
        return this;
    }

    /**
     * 设置 [上级部门标识]
     */
    public SysDepartmentDTO setParentId(String parentId) {
        this.parentId = parentId;
        this.modify("parent_id", parentId);
        return this;
    }

    /**
     * 设置 [上级部门名称]
     */
    public SysDepartmentDTO setParentName(String parentName) {
        this.parentName = parentName;
        this.modify("parent_name", parentName);
        return this;
    }

    /**
     * 设置 [部门编号]
     */
    public SysDepartmentDTO setDepartmentNumber(String departmentNumber) {
        this.departmentNumber = departmentNumber;
        this.modify("department_number", departmentNumber);
        return this;
    }

    /**
     * 设置 [备注]
     */
    public SysDepartmentDTO setDescription(String description) {
        this.description = description;
        this.modify("description", description);
        return this;
    }

    /**
     * 设置 [简称]
     */
    public SysDepartmentDTO setShortName(String shortName) {
        this.shortName = shortName;
        this.modify("short_name", shortName);
        return this;
    }

    /**
     * 设置 [排序]
     */
    public SysDepartmentDTO setSort(Long sort) {
        this.sort = sort;
        this.modify("sort", sort);
        return this;
    }

    /**
     * 设置 [业务类别]
     */
    public SysDepartmentDTO setBusinessCategory(List<String> businessCategory) {
        this.businessCategory = businessCategory;
        this.modify("business_category", businessCategory);
        return this;
    }

    /**
     * 设置 [上级标识]
     */
    public SysDepartmentDTO setParentUnitId(String parentUnitId) {
        this.parentUnitId = parentUnitId;
        this.modify("parent_unit_id", parentUnitId);
        return this;
    }

    /**
     * 设置 [上级名称]
     */
    public SysDepartmentDTO setParentUnitName(String parentUnitName) {
        this.parentUnitName = parentUnitName;
        this.modify("parent_unit_name", parentUnitName);
        return this;
    }

    /**
     * 设置 [DN]
     */
    public SysDepartmentDTO setDn(String dn) {
        this.dn = dn;
        this.modify("dn", dn);
        return this;
    }

    /**
     * 设置 [下级部门]
     */
    public SysDepartmentDTO setChildren(List<SysDepartmentDTO> children) {
        this.children = children;
        this.modify("children", children);
        return this;
    }

    /**
     * 设置 [上级标识]
     */
    public SysDepartmentDTO setParentIds(List<String> parentIds) {
        this.parentIds = parentIds;
        this.modify("parent_ids", parentIds);
        return this;
    }

    /**
     * 设置 [下级标识]
     */
    public SysDepartmentDTO setSubIds(List<String> subIds) {
        this.subIds = subIds;
        this.modify("sub_ids", subIds);
        return this;
    }

    /**
     * 设置 [用户组]
     */
    public SysDepartmentDTO setGroups(List<SysOrganizationalRoleDTO> groups) {
        this.groups = groups;
        this.modify("groups", groups);
        return this;
    }


}
